home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / icie.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.5 KB  |  91 lines

  1. /* Copyright (C) 1995, 1998, 1999 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: icie.h,v 1.2 2000/09/19 19:00:42 lpd Exp $ */
  20. /* Internal definitions for interpreter CIE color handling */
  21.  
  22. #ifndef icie_INCLUDED
  23. #  define icie_INCLUDED
  24.  
  25. /*
  26.  * All of the routines below are exported by zcie.c for zcrd.c,
  27.  * except for cie_cache_joint which is exported by zcrd.c for zcie.c.
  28.  */
  29.  
  30. /* ------ Parameter acquisition ------ */
  31.  
  32. /* Get a range array parameter from a dictionary. */
  33. /* We know that count <= 4. */
  34. int dict_ranges_param(P4(const ref * pdref, const char *kstr, int count,
  35.              gs_range * prange));
  36.  
  37. /* Get 3 ranges from a dictionary. */
  38. int dict_range3_param(P3(const ref *pdref, const char *kstr,
  39.              gs_range3 *prange3));
  40.  
  41. /* Get a 3x3 matrix parameter from a dictionary. */
  42. int dict_matrix3_param(P3(const ref *pdref, const char *kstr,
  43.               gs_matrix3 *pmat3));
  44.  
  45. /* Get an array of procedures from a dictionary. */
  46. /* We know count <= countof(empty_procs). */
  47. int dict_proc_array_param(P4(const ref * pdict, const char *kstr,
  48.                  uint count, ref * pparray));
  49.  
  50. /* Get 3 procedures from a dictionary. */
  51. int dict_proc3_param(P3(const ref *pdref, const char *kstr, ref proc3[3]));
  52.  
  53. /* Get WhitePoint and BlackPoint values. */
  54. int cie_points_param(P2(const ref * pdref, gs_cie_wb * pwb));
  55.  
  56. /* Process a 3- or 4-dimensional lookup table from a dictionary. */
  57. /* The caller has set pclt->n and pclt->m. */
  58. /* ptref is known to be a readable array of size at least n+1. */
  59. int cie_table_param(P3(const ref * ptable, gx_color_lookup_table * pclt,
  60.                gs_memory_t * mem));
  61.  
  62. /* ------ Internal routines ------ */
  63.  
  64. int cie_cache_push_finish(P4(i_ctx_t *i_ctx_p, op_proc_t finish_proc,
  65.                  gs_ref_memory_t * imem, void *data));
  66. int cie_prepare_cache(P7(i_ctx_t *i_ctx_p, const gs_range * domain,
  67.              const ref * proc, cie_cache_floats * pcache,
  68.              void *container, gs_ref_memory_t * imem,
  69.              client_name_t cname));
  70. int cie_prepare_caches_4(P10(i_ctx_t *i_ctx_p, const gs_range * domains,
  71.                  const ref * procs,
  72.                  cie_cache_floats * pc0,
  73.                  cie_cache_floats * pc1,
  74.                  cie_cache_floats * pc2,
  75.                  cie_cache_floats * pc3 /* may be 0 */,
  76.                  void *container,
  77.                  gs_ref_memory_t * imem, client_name_t cname));
  78. #define cie_prepare_cache3(p,d3,p3,c3,pcie,imem,cname)\
  79.   cie_prepare_caches_4(p, (d3)->ranges, p3,\
  80.                &(c3)->floats, &(c3)[1].floats, &(c3)[2].floats,\
  81.                NULL, pcie, imem, cname)
  82. #define cie_prepare_cache4(p,d4,p4,c4,pcie,imem,cname)\
  83.   cie_prepare_caches_4(p, (d4)->ranges, p4,\
  84.                &(c4)->floats, &(c4)[1].floats, &(c4)[2].floats,\
  85.                &(c4)[3].floats, pcie, imem, cname)
  86.  
  87. int cie_cache_joint(P4(i_ctx_t *, const ref_cie_render_procs *,
  88.                const gs_cie_common *, gs_state *));
  89.  
  90. #endif /* icie_INCLUDED */
  91.